export enum HeadersType {
	Json = "application/json;charset=UTF-8",
	Urlencoded = "application/x-www-form-urlencoded;charset=UTF-8",
	FormData = "multipart/form-data",
}

export type Methods = "GET" | "POST" | "DELETE" | "PUT";

export type Params = Record<string, any>;

export type Options = {
	header?: HeadersType;
	[x: string]: any;
};
// 基础请求
export interface HttpBaseResult {
	[x: string]: any;
	// 成功状态
	success?: boolean;
	// 消息
	message: string;
	// 类型
	type?: string;
}

export interface HttpRow<T = any> extends HttpBaseResult {
	[x: string]: any;
	// 分页集合数据
	rows?: Array<T>;
	// 页数
	page: number;
	// 条数
	pageSize: number;
	// 总条数
	total: number;
}

export interface HttpData<T = any> extends HttpBaseResult {
	data?: T;
}
export interface HttpResult<T = any> extends HttpBaseResult {
	result?: T;
	code: number;
	/**
	 * 
	// 页数
	page: number;
	// 条数
	pageSize: number;
	// 总条数
	total: number;
	 */
}

export interface HttpPage extends HttpBaseResult {
	total: number;
	page: number;
	pageSize: number;
}
